<template>
	<view>
		<view class="uni-padding-wrap">
			<view class="cu-bar bg-white solid-bottom">
				<view class="action">
					<text class='cuIcon-title text-blue'></text>刷题科目
				</view>
			</view>
			<view class="grid col-1 padding-sm">
				<view class="padding-sm">
					<view @click="gotozlws()" class="padding radius text-center shadow-blur" style="word-break:break-all" :class="'bg-green'">
						<view class="text-lg">完善用户信息</view>
						<view class="margin-top-sm text-Abc">信息用于刷题</view>
					</view>
				</view>
			</view>
			<view class="grid col-2 padding-sm">
				<view class="padding-sm" v-for="(item,index) in ColorListaaa" :key="index">
					<view @click="gotost(item)" class="padding radius text-center shadow-blur" style="word-break:break-all" :class="'bg-' + item.color">
						<view class="text-lg">{{item.title}}</view>
						<view class="margin-top-sm text-Abc">{{item.zb}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>


<script>
	var _this;
	var vk = uni.vk;
	export default {
		data() {
			// 页面数据变量
			return {
				options:{},
				ColorListaaa:[],
				ColorListccc :[{
						title: '嫣红aaaaaaaaaaaaa',
						name: 'red',
						color: '#e54d42'
					},
					{
						title: '桔橙',
						name: 'orange',
						color: '#f37b1d'
					},
					{
						title: '明黄',
						name: 'yellow',
						color: '#fbbd08'
					},
					{
						title: '橄榄',
						name: 'olive',
						color: '#8dc63f'
					},
					{
						title: '森绿',
						name: 'green',
						color: '#39b54a'
					},
					{
						title: '天青',
						name: 'cyan',
						color: '#1cbbb4'
					},
					{
						title: '海蓝',
						name: 'blue',
						color: '#0081ff'
					},
					{
						title: '姹紫',
						name: 'purple',
						color: '#6739b6'
					},
					{
						title: '木槿',
						name: 'mauve',
						color: '#9c26b0'
					},
					{
						title: '桃粉',
						name: 'pink',
						color: '#e03997'
					},
					{
						title: '棕褐',
						name: 'brown',
						color: '#a5673f'
					},
					{
						title: '玄灰',
						name: 'grey',
						color: '#8799a3'
					},
					{
						title: '草灰',
						name: 'gray',
						color: '#aaaaaa'
					},
					{
						title: '墨黑',
						name: 'black',
						color: '#333333'
					},
					{
						title: '雅白',
						name: 'white',
						color: '#ffffff'
					},
				]
			}
		},
		// 监听 - 页面每次【加载时】执行(如：前进) await
		async onLoad(options = {}) {
			_this = this;
			vk = uni.vk;
			this.options = options;
			this.init(options);
			await this.getListsss();
		},
		// 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快，会在页面进入动画完成前触发
		onReady(){
			
		},
		// 监听 - 页面每次【显示时】执行(如：前进和返回) (页面每次出现在屏幕上都触发，包括从下级页面点返回露出当前页面)
		onShow() {
			
		},
		// 监听 - 页面每次【隐藏时】执行(如：返回)
		onHide() {
			
		},
		// 监听 - 点击右上角转发时
		onShareAppMessage(options) {
			
		},
		// 函数
		methods: {
			gotozlws(){
				vk.navigateTo('/pages_bd/stgl/stxxws');
			},
			gotost(item){
				console.log(item)
				vk.navigateTo('/pages_bd/stgl/sttm?stid='+item._id+'&title='+item.title);
			},
			getListsss(){
				return vk.callFunction({
				  url: 'client/jp/pub/xsxxgl-stkmapi.getListsss',
				  title:'请求中...',
				  data:{}
				}).then((data) => {
					//console.log(data)
				  this.ColorListaaa = data.list;
				}).catch((err) => {
				  
				});
			},
			// 页面数据初始化函数
			init(options){
				//vk.reLaunch("/pages_template/uni-id/index/index");
			},
			pageTo(path){
				vk.navigateTo(path);
			}
		},
		// 监听器
		watch:{
			
		},
		// 计算属性
		computed:{
			
		}
	}
</script>
<style lang="scss" scoped>
	
	
</style>